// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init()

// 云函数入口函数
exports.main = async (event, context) => {
  const wxContext = cloud.getWXContext()
  const fileID = 'cloud://cloud1-5gp6rm0z7a10032a.636c-cloud1-5gp6rm0z7a10032a-1309904561/num.json'
  const res = await cloud.downloadFile({
    fileID: fileID,
  })
  const buffer = res.fileContent
  const config = JSON.parse(buffer.toString('utf8'))
  return config
}